import React, { Component } from 'react'

class Child extends Component {
  shouldComponentUpdate () {
    return false
  }
  render () {
    console.log('child render')
    return (
      <div>child</div>
    )
  }
}
export default class App extends Component {
  state = { count: 10 }
  render() {
    return (
      <div>
        <button onClick = { () => {
          this.setState(({ count }) => ({ count: count + 10}))
        }}>加</button>{ this.state.count }
        <Child test={ this.state.count }/>
      </div>
    )
  }
}
